#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int num = 0;

	scanf("%d", &num);

	while (num)
	{
		printf("%d ", num % 10);
		num = num / 10;
	}

	return 0;
}